diff --git a/include/dailymotion.php b/include/dailymotion.php index 169a0628fe6bb45d1a301da495ee73848579983d..7a490837f008abe63c20ed2d7bb016b895e918f7 100644 --- a/include/dailymotion.php +++ b/include/dailymotion.php @@ -1,13 +1,18 @@ EPTV - Dailymotion Publication
+function getDailymotion() { + // get video indentifier + $result = getOneVideo($_GET['dailymotion']); + if (mysql_num_rows($result)) { + $video = mysql_fetch_array($result); + echo 'EPTV - Dailymotion - '.$video["video_name"].'
'; + } + else + die("No video found with this identifier!"); return; } ?> \ No newline at end of file diff --git a/include/functions_sql.php b/include/functions_sql.php index da54b7c52332efd7a6e11af5c87a72edacfd0855..45fdf763e4f7c13bb823d54bad8787441dc5b5a9 100644 --- a/include/functions_sql.php +++ b/include/functions_sql.php @@ -42,8 +42,9 @@ function getAllEdito(){ function getOneVideo($vid_id){ + $vid_id = mysql_real_escape_string($vid_id); $query = "select * from $DB.videos_db WHERE video_id = '$vid_id'"; - return $result = mysql_query($query); + return mysql_query($query); } diff --git a/include/home.php b/include/home.php index aa77e5b9dc15451a514f65d7b6f1d2c3b184f3b2..6cd6b4702f5501453b589468f943f240abccdb03 100644 --- a/include/home.php +++ b/include/home.php @@ -113,8 +113,10 @@ function dispHomeLastVideos(){ $str .= ' 
  • '.$video["video_name"].''; if ($video["video_path_daily"]) { - $str .= '    - '; + $str .= '   '; + $str .= ''; + $str .= ''; + $str .= ''; } $str .= '   '.$video["video_size"].' Mo'; } diff --git a/include/script.js b/include/script.js new file mode 100644 index 0000000000000000000000000000000000000000..6d72fd152f67b4f1858d32522db6e2e41102970f --- /dev/null +++ b/include/script.js @@ -0,0 +1,7 @@ + diff --git a/include/section.php b/include/section.php index c439119ffee6c6564188ee717cd382ecc19841fc..267131b52b97778b5614d1c862444b1ad864865b 100644 --- a/include/section.php +++ b/include/section.php @@ -38,6 +38,7 @@ function dispHeader() { echo ''; + include 'script.js'; echo ''; } @@ -47,8 +48,6 @@ function dispBody() { echo ''; echo '
    '; echo '
    '; - echo ''; - echo ''; dispMenu(); echo '
    '; dispSection(); diff --git a/index.php b/index.php index 46058d1dc6c0a7c71ff1775232d3107adbcfc40f..5a08a3c6c4c880ec91e7f27ca7a8a045cd032dd8 100644 --- a/index.php +++ b/index.php @@ -49,7 +49,7 @@ if ($_GET['video']) // Dailymotion playback if ($_GET['dailymotion']) - return getDailymotion($_GET['dailymotion']); + return getDailymotion(); // Display section getSection();